<!-- //功能异常 -->
<template>
	<view>
		<!-- 功能异常选项卡 -->
		<feedbackContent :dataliist="datalist" @backtitle="backtitle" v-if="screen === 0" />
		<!-- 信息填写 -->
		<feedbackdetail :backtitledata="backtitledata" :backtheid="backtheid" :basesort="basesort" @sendfeedbackdetail="sendfeedbackdetail" v-else></feedbackdetail>
	</view>
</template>

<script>
	import feedbackdetail from '@/components/feedbackDetail/feedbackDetail.vue'
	import feedbackContent from '@/components/feedbackContent/feedbackContent.vue'
	import $http from '@/common/api/request.js'
	export default {
		data() {
			return {
				datalist:[],
				tempFiles: [],
				baseurl:" https://zyc618.mynatapp.cc",
				backtitledata:"",
				screen:0,
				backtheid:0,
				basesort:-1
			};
		},
		methods:{
			getdata(){
				$http.request({
					url: "/getfeedbackContent",
				}).then((res) => {
					uni.showToast({
						title: "获取数据中...",
						icon: "none",
						mask: true,
						duration: 200,
						success: () => {
							this.datalist = res
							
						}
					})
				
				}).catch(() => {
					uni.showToast({
						title: "失败",
						icon: "error",
						mask: true,
						duration: 2000
					})
				})
			},
			backtitle(a,b){
				this.backtitledata = a;
				this.backtheid = b
				
				if(this.backtitledata)
				{
					this.screen =1
				}
			},
			sendfeedbackdetail(a){
				this.backtitledata = a;
				
				if(this.backtitledata)
				{
					this.screen =0
				}
			}
		},
		components:{
			feedbackdetail,feedbackContent
		},
		onLoad(e) {
			this.basesort = e.basesort
			
			this.getdata()
		}
	}
</script>

<style lang="scss">

</style>
